/*
 * @Author: 华开峰
 * @Date: 2022-03-03 17:26:26
 * @LastEdit: 
 * @LastEditors: hkf
 * @LastEditTime: 2022-03-09 14:31:08
 * @FilePath: \sharePlatform\design\webpack-box\app\webpack.config.js
 * @Descripition: 
 */
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
    mode: 'development',
    entry: "./src/index.js",
    output: {
        filename: "index.js",
        path: path.resolve(__dirname, "dist"),
    },
    plugins: [
        new CopyWebpackPlugin([{
                from: "./src/index.html",
                to: "index.html"
            },
            {
                from: "./src/list-item.html",
                to: "list-item.html"
            },
            {
                from: "./src/product.html",
                to: "product.html"
            }
        ]),
    ],
    devServer: { contentBase: path.join(__dirname, "dist"), compress: true },
};